package ott.neumont.filter;

import java.io.*;

import javax.security.auth.callback.*;

import org.apache.ws.security.*;

public class PasswordCallbackHandler implements javax.security.auth.callback.CallbackHandler {

	public void handle(Callback[] callbacks) throws IOException, UnsupportedCallbackException {
		// used to get/set/check the password and username
		WSPasswordCallback passcallback = (WSPasswordCallback) callbacks[0];

		if (passcallback.getIdentifier().equals("user")) {
			passcallback.setPassword("password");
		}

	}

}
